home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / ConnectionTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  2.4 KB  |  126 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ConnectionTools.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __CONNECTIONTOOLS__
  13. #define __CONNECTIONTOOLS__
  14.  
  15. #ifndef __DIALOGS__
  16. #include <Dialogs.h>
  17. #endif
  18.  
  19. #ifndef __CONNECTIONS__
  20. #include <Connections.h>
  21. #endif
  22.  
  23.  
  24. enum {
  25.  
  26.  
  27. /* messages for DefProc */
  28.  cmInitMsg = 0,
  29.  cmDisposeMsg = 1,
  30.  cmSuspendMsg = 2,
  31.  cmResumeMsg = 3,
  32.  cmMenuMsg = 4,
  33.  cmEventMsg = 5,
  34.  cmActivateMsg = 6,
  35.  cmDeactivateMsg = 7,
  36.  
  37.  cmIdleMsg = 50,
  38.  cmResetMsg = 51,
  39.  cmAbortMsg = 52,
  40.  
  41.  cmReadMsg = 100,
  42.  cmWriteMsg = 101,
  43.  cmStatusMsg = 102,
  44.  cmListenMsg = 103,
  45.  cmAcceptMsg = 104,
  46.  cmCloseMsg = 105,
  47.  cmOpenMsg = 106,
  48.  cmBreakMsg = 107,
  49.  cmIOKillMsg = 108
  50. };
  51. enum {
  52.  cmEnvironsMsg = 109,
  53.  
  54. /* new connection tool messages for ctb 1.1 */
  55.  cmNewIOPBMsg = 110,
  56.  cmDisposeIOPBMsg = 111,
  57.  cmGetErrorStringMsg = 112,
  58.  cmPBReadMsg = 113,
  59.  cmPBWriteMsg = 114,
  60.  cmPBIOKillMsg = 115,
  61.  
  62. /*    messages for validate DefProc    */
  63.  cmValidateMsg = 0,
  64.  cmDefaultMsg = 1,
  65.  
  66. /*    messages for Setup DefProc    */
  67.  cmSpreflightMsg = 0,
  68.  cmSsetupMsg = 1,
  69.  cmSitemMsg = 2,
  70.  cmSfilterMsg = 3,
  71.  cmScleanupMsg = 4,
  72.  
  73. /*    messages for scripting defProc    */
  74.  cmMgetMsg = 0,
  75.  cmMsetMsg = 1,
  76.  
  77. /*    messages for localization defProc    */
  78.  cmL2English = 0,
  79.  cmL2Intl = 1
  80.  
  81. /*    private data constants */
  82.  
  83. #define cdefType 'cdef'        /* main connection definition procedure    */
  84. #define cvalType 'cval'        /* validation definition procedure    */
  85. #define csetType 'cset'        /* connection setup definition procedure    */
  86. #define clocType 'cloc'        /* connection configuration localization defProc    */
  87. #define cscrType 'cscr'        /* connection scripting defProc interfaces    */
  88.  
  89. #define cbndType 'cbnd'        /* bundle type for connection    */
  90. #define cverType 'vers'
  91. };
  92.  
  93. struct CMDataBuffer {
  94.  Ptr thePtr;
  95.  long count;
  96.  CMChannel channel;
  97.  CMFlags flags;
  98. };
  99.  
  100. typedef struct CMDataBuffer CMDataBuffer;
  101. typedef CMDataBuffer *CMDataBufferPtr;
  102.  
  103. struct CMCompletorRecord {
  104.  Boolean async;
  105.  ProcPtr completionRoutine;
  106. };
  107.  
  108. typedef struct CMCompletorRecord CMCompletorRecord;
  109. typedef CMCompletorRecord *CMCompletorPtr;
  110.  
  111. /* Private Data Structure */
  112.  
  113. struct CMSetupStruct {
  114.  DialogPtr theDialog;
  115.  short count;
  116.  Ptr theConfig;
  117.  short procID;                /* procID of the tool */
  118. };
  119.  
  120. typedef struct CMSetupStruct CMSetupStruct;
  121. typedef CMSetupStruct *CMSetupPtr;
  122.  
  123.  
  124.  
  125. #endif
  126.